package com.example.myproject.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.persistence.*;
import java.time.LocalDateTime;

@Data
@TableName("user")
public class User {

    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @TableField("user_name")
    private String userName;

    @TableField("password")
    private String password;

    @TableField("user_status")
    private String userStatus; // active / banned / inactive

    @TableField("role")
    private String role; // user / admin

    @TableField("email")
    private String email;

    @TableField("user_level")
    private Integer userLevel;

//    @TableField("avatar_url")
//    private String avatarUrl;

    @TableField("bio")
    private String bio;

    @TableField("title_id")
    private Long titleId;

    @TableField("avatar")
    private String avatar;

    @TableField("email_verified")
    private Boolean emailVerified;

    @TableField("nick_name")
    private String nickName;

    @TableField("created_time")
    private LocalDateTime createdTime;

    @TableField("user_experience")
    private Integer userExperience;

    @TableField(value = "passkey")
    private String passkey;
}